package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import com.atguigu.eduservice.client.impl.VodClientImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "service-vod", fallback = VodClientImpl.class)
@Component
public interface VodClient {

    @ApiOperation("通过Ids删除多个")
    @PostMapping("/vod/video/delete")
    R deleteVideoById(@RequestBody List<String> ids);

    @ApiOperation("通过Id删除单个")
    @PostMapping("/vod/video/deleteOne/{id}")
    R deleteVideoById(@PathVariable("id") String id);

    @ApiOperation("通过Id获取视频信息")
    @PostMapping("/vod/video/info/{id}")
    R getInfoById(@PathVariable("id") String id);

}
